/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.dp.vo;

import java.io.Serializable;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author wyr
 */
@Entity
@Table(name = "t_resources")
//@NamedQueries({@NamedQuery(name = "TResources.findAll", query = "SELECT t FROM TResources t"), @NamedQuery(name = "TResources.findByResourceid", query = "SELECT t FROM TResources t WHERE t.resourceid = :resourceid"), @NamedQuery(name = "TResources.findByContentid", query = "SELECT t FROM TResources t WHERE t.contentid = :contentid"), @NamedQuery(name = "TResources.findByUseragents", query = "SELECT t FROM TResources t WHERE t.useragents = :useragents"), @NamedQuery(name = "TResources.findByName", query = "SELECT t FROM TResources t WHERE t.name = :name"), @NamedQuery(name = "TResources.findByType", query = "SELECT t FROM TResources t WHERE t.type = :type"), @NamedQuery(name = "TResources.findBySpcode", query = "SELECT t FROM TResources t WHERE t.spcode = :spcode"), @NamedQuery(name = "TResources.findByUrl", query = "SELECT t FROM TResources t WHERE t.url = :url"), @NamedQuery(name = "TResources.findBySize", query = "SELECT t FROM TResources t WHERE t.size = :size"), @NamedQuery(name = "TResources.findByFormat", query = "SELECT t FROM TResources t WHERE t.format = :format"), @NamedQuery(name = "TResources.findByDistributorid", query = "SELECT t FROM TResources t WHERE t.distributorid = :distributorid")})
public class TResources implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "resourceid")
    private String resourceid;
    @Column(name = "contentid")
    private String contentid;
    @Column(name = "useragents")
    private String useragents;
    @Column(name = "name")
    private String name;
    @Column(name = "type")
    private String type;
    @Column(name = "spcode")
    private String spcode;
    @Column(name = "url")
    private String url;
    @Column(name = "size")
    private Integer size;
    @Column(name = "format")
    private String format;
    @Column(name = "distributorid")
    private String distributorid;

    public TResources() {
    }

    public TResources(String resourceid) {
        this.resourceid = resourceid;
    }

    public String getResourceid() {
        return resourceid;
    }

    public void setResourceid(String resourceid) {
        this.resourceid = resourceid;
    }

    public String getContentid() {
        return contentid;
    }

    public void setContentid(String contentid) {
        this.contentid = contentid;
    }

    public String getUseragents() {
        return useragents;
    }

    public void setUseragents(String useragents) {
        this.useragents = useragents;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getSpcode() {
        return spcode;
    }

    public void setSpcode(String spcode) {
        this.spcode = spcode;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public Integer getSize() {
        return size;
    }

    public void setSize(Integer size) {
        this.size = size;
    }

    public String getFormat() {
        return format;
    }

    public void setFormat(String format) {
        this.format = format;
    }

    public String getDistributorid() {
        return distributorid;
    }

    public void setDistributorid(String distributorid) {
        this.distributorid = distributorid;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (resourceid != null ? resourceid.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TResources)) {
            return false;
        }
        TResources other = (TResources) object;
        if ((this.resourceid == null && other.resourceid != null) || (this.resourceid != null && !this.resourceid.equals(other.resourceid))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.dp.vo.TResources[resourceid=" + resourceid + "]";
    }

}
